/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package rete;
import javax.swing.JOptionPane;
/**
*
* @author Administrator
*/
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
     
   Object[] options = {"Server", "Client"};
   int scelta = JOptionPane.showOptionDialog(null, "Cosa sei Client o Server?", "Giocare",
        JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE,
        null, options, options[1]);
   System.out.println(scelta);
   switch(scelta){
       case 0:{
               Server.server();
               break;
              }
       case 1:{
               Client.client();
               break;
              }
       case -1:{
               System.out.println("Programma Chiuso senza aver effettuato nessuna operazione!");
               break;
              }
       }
       }
   }
